import {
  request
} from '@/utils/http';
import common from '../utils/common';

// 人才推荐
const getListResume = (params) => request(params, 'app/listResume');

// 企业注册
const compRegister = (params) => request(params, 'app/regis'); // wxRegis

// 数据统计
const getDataStats = () => request({loading: false, data: {compId: common.getCompId()}}, 'app/countCompActive');

// 首页数据
const getIndexData = () => request({loading: false, data: {compId: common.getCompId()}}, 'app/indexAll');

// 查询所有职位
const getlistRecruitment = (params) => request(params, 'app/listRecruitment');

// 删除职位
const deleteRecruitment = (params) => request(params, 'app/deleteRecruitment');

// 修改职位
const updateRecruitment = (params) => request(params, 'app/updateRecruitment');

//职位排序
const recruitSort = (params) => request(params, 'app/recruitSort');

// 已关注简历
const getConcernResumeList = (params) => request(params, 'app/getConcernResumeList');

// 搜索职位
const search = (params) => request(params, 'app/searchPosition');

// 今日面试 面试
const getInterview = (params) => request(params, 'app/listInterviewActive');

// 昨日日报汇报
const getYesterDaily = (params) => request(params, 'app/getDaily');

// 导航
const getNavigation = (params) => request(params, 'app/getNavigationList');

// 人才库
const getResume = (params) => request(params, 'app/receiveResume');

// 导航详情
const getNavigationDetil  = (params) => request(params, 'app/getNavigationDetil');

// 创建面试邀请
const createInterview = (params) => request(params, 'app/createInterview');

// 发布职位
const saveRecruitment = (params) => request(params, 'app/saveRecruitment');

// 修改职位
const editRecruitment = (params) =>request(params, 'app/updateRecruitment');

// 查询单个职位
const getSingleRement = (params) => request(params, 'app/recruitment');

// 获取已开放的第三方招聘平台
const getTerraceList  = () => request({data: {compId: common.getCompId()}}, 'app/getTerraceList');

// 公共添加账号接口
const addThirdAccount  = (params) => request(params, 'app/third/addThirdAccount');

// 获取58验证码
const getCode58 = (params) => request(params, 'app/third/get58Code');

// 提交验证码
const sendCode58 = (params) => request(params, 'app/third/send58Code');

export default {
  search,
  compRegister,
  getListResume,
  getDataStats,
  getIndexData,
  getConcernResumeList,
  getInterview,
  getYesterDaily,
  getNavigation,
  getResume,
  getNavigationDetil,
  createInterview,
  getlistRecruitment,
  deleteRecruitment,
  recruitSort,
  updateRecruitment,
  saveRecruitment,
  editRecruitment,
  getSingleRement,
  getTerraceList,
  addThirdAccount,
  getCode58,
  sendCode58
}

